<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        //随机点名
        // let arr = ['赵云','马超','关羽','张飞','刘备','曹操','典韦','司马懿']
        // let ran = Math.floor(Math.random()* arr.length)
        // alert(arr[ran])
        // document.write(arr[ran])


        
        function fn(){
            let arr1 = [1,2,3,4,5,6,7,8,9,10]
            let suiji = Math.floor(Math.random()* arr1.length)
            alert(arr1[suiji])
        }
        fn()
        let a = +prompt('请输入你的猜测')
        
        
        

        
    </script>
</body>
</html>